package com.httputils;

import android.os.Environment;


public class NetworkConstant {
	public static final int REQUEST_TIMEOUT = 60000;// 请求超时为10秒
	public static final int RESPONSE_TIMEOUT = 60000;// 响应超时为60秒
	public static String ENCODE = "UTF-8";
	public static final int INVALID_TOKEN = -4;// 其他错误
	public static final int OTHER_ERROR = -1;// 其他错误
	public static final int TIMEOUT_ERROR = -2;// 超时
	public static final int FORCE_CLOSE = -3;// 强制关闭
	public static final int RIGHT_CODE = 0;// 联网正常
	public static final int FILE_EXIT = 1;// 文件已存在
	public static final int SD_NOSPACE = 2;// sd卡空间不足
	public static final int JSON_POST = 0;
	public static final int JSON_GET = 1;
	public static final int JSON_PUT = 2;

	public static String APK_DIR = "/QrinstantAndroid/apk/";
	public static String APK_NAME = "QrinstantAndroid.apk";
	public static String EXCEPTION_PATH = "/QrinstantAndroid/exceptionLog/";
	public static String RESPONSE_SUCCESS = "00";

	public static int COMM_TYPE = AndroidCommFactory.COMM_TYPE_HTTPS;
	public static final String HTTP_SVR = "http://192.168.1.104:8080/Qr";
	public static final String HTTP_ROOT = "/execute";// 项目

	public static final String REQUEST_URL = HTTP_SVR + HTTP_ROOT;

	public static final String BKS_RES_PATH = "/res/raw/https_keystore_lan.bks";
	public static final int HTTP_PORT = 9084;
	public static final int HTTPS_PORT = 443;

	public static final int APK_DOWNLOAD_COMM_TYPE = COMM_TYPE;
	public static final int IMG_DOWNLOAD_COMM_TYPE = COMM_TYPE;

	/* 图片存放位置 */
	// /mnt/sdcard
	public static final String IMGE_PATH_SDCARD = Environment
			.getExternalStorageDirectory() + "/QrinstantAndroid/imgCache";// 默认图片缓存地址
//	public static final String IMGE_PATH_SDCARD = Environment
//	.getExternalStorageDirectory() + "/QrinstantAndroid/imgCache/";// 默认图片缓存地址
	public static final int COMM_TIMEOUT = 60000;

}
